package com.example.java2e.Service.Impl;

import com.example.java2e.Dao.RecordDao;
import com.example.java2e.Entity.Record;
import com.example.java2e.Service.RecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RecordServiceImpl implements RecordService {
    @Autowired
    private RecordDao recordDao;
    @Override
    public void add_record(String date, String driver, String id_driver, long id_route, String id_vehicle, int direction){
        recordDao.add_record(date, driver, id_driver, id_route, id_vehicle, direction);
    }
    @Override
    public void delete_record(long id_route, String date, int direction){
        recordDao.delete_record(id_route,date,direction);
    }
    @Override
    public List<Record> check_record(){
        return recordDao.check_record();
    }
    @Override
    public List<Record>check_record_detail(long id_route, String date, int direction){
        return recordDao.check_record_detail(id_route,date,direction);
    }
    @Override
    public List<Record>check_record_start(long id_route){
        return recordDao.check_record_start(id_route);
    }
    @Override
    public List<Record>check_record_end(long id_route){
        return recordDao.check_record_end(id_route);
    }

}
